package kasgroup2;

class Room {

    private EnumRoomType roomType;
    private int roomNumber;
    private RoomService roomService;
    private double roomPrice;
    private boolean isAvailable;
    private boolean useRoomService;
    
    public Room(EnumRoomType p_RoomType, double p_RoomPrice, RoomService p_RoomService) {
        this.roomType = p_RoomType;
        this.roomPrice = p_RoomPrice;
        this.roomService = p_RoomService;
        this.isAvailable = true;
        this.useRoomService = false;
    }
    
    public Room(EnumRoomType p_RoomType, double p_RoomPrice) {
        this(p_RoomType, p_RoomPrice, null);
    }

    public int getRoomNumber() {
        return roomNumber;
    }

    public Double getRoomPrice() {
        return roomPrice;
    }
    
    public Double getRoomServicePrice() {
        if(roomService != null && useRoomService) {
            return roomService.getPrice();
        }
        return 0.0;
    }

    public Double getRoomTotalPrice() {
        return roomPrice + getRoomServicePrice();
    }
    
    public EnumRoomType getRoomType() {
        return roomType;
    }
    
    public boolean getIsAvailable() {
        return isAvailable;
    }
    
    public void setRoomNumber(int p_roomNumber) {
        //this.roomNumber = p_RoomNumber;
    }
    
    public void setIsAvailable(boolean p_IsAvailable) {
        this.isAvailable = p_IsAvailable;
    }

    public RoomService getRoomService() {
        return this.roomService;
    }
    
    public void setRoomServiceStatus(Boolean p_Status) {
        this.useRoomService = p_Status;
    }
}
